API Documentation
Public Member Functions | List of all members
nkImages::ImageView Class Referencefinal

Holds all information required for an image, with no ownership over the data. More...

Inheritance diagram for nkImages::ImageView:
nkImages::ImageBase

Public Member Functions

 ImageView ()=delete
 
 ImageView (const Image &image)
 
 ImageView (const nkMemory::BufferView< unsigned char > &dataView)
 
 ImageView (const nkMemory::BufferView< unsigned char > &dataView, unsigned int width, unsigned int height, PIXEL_FORMAT format)
 
 ImageView (const nkMemory::BufferView< unsigned char > dataView, unsigned int width, unsigned int height, unsigned int depth, PIXEL_FORMAT format, unsigned int pixelByteSize, unsigned int rowByteSize)
 
 ImageView (const ImageView &other)
 
 ImageView (ImageView &&other)
 
 ~ImageView ()
 
virtual unsigned char * getDataPtr () const override
 
ImageViewoperator= (const ImageView &other)
 
ImageViewoperator= (ImageView &&other)
 
- Public Member Functions inherited from nkImages::ImageBase
 ImageBase ()
 
 ImageBase (unsigned int width, unsigned int height, PIXEL_FORMAT format)
 
 ImageBase (unsigned int width, unsigned int height, unsigned int depth, PIXEL_FORMAT format, unsigned int pixelByteSize, unsigned int rowByteSize)
 
 ImageBase (const ImageBase &other)
 
 ImageBase (ImageBase &&other)
 
virtual ~ImageBase ()
 
unsigned int getWidth () const
 
unsigned int getHeight () const
 
unsigned int getDepth () const
 
PIXEL_FORMAT getFormat () const
 
unsigned int getPixelByteSize () const
 
unsigned int getRowByteSize () const
 
unsigned int getSliceByteSize () const
 
void setWidth (unsigned int value)
 
void setHeight (unsigned int value)
 
void setDepth (unsigned int value)
 
void setFormat (PIXEL_FORMAT value)
 
void setPixelByteSize (unsigned int value)
 
void setRowByteSize (unsigned int value)
 
void setSliceByteSize (unsigned int value)
 
nkMaths::Vector getPixel (unsigned int x, unsigned int y, unsigned int z=1)
 
ImageBaseoperator= (const ImageBase &other)
 
ImageBaseoperator= (ImageBase &&other)
 

Detailed Description

Holds all information required for an image, with no ownership over the data.

See ImageBase for more information.

Constructor & Destructor Documentation

◆ ImageView() [1/7]

nkImages::ImageView::ImageView ( )
delete

Default constructor.

◆ ImageView() [2/7]

nkImages::ImageView::ImageView ( const Image image)

View over image constructor.

Parameters
imageThe image to create a view over.

◆ ImageView() [3/7]

nkImages::ImageView::ImageView ( const nkMemory::BufferView< unsigned char > &  dataView)

Data view constructor.

Parameters
dataViewThe view which data should be part of the image.

◆ ImageView() [4/7]

nkImages::ImageView::ImageView ( const nkMemory::BufferView< unsigned char > &  dataView,
unsigned int  width,
unsigned int  height,
PIXEL_FORMAT  format 
)

Simple 2D view constructor.

Parameters
dataViewThe view over the data which should be part of the image.
widthThe width of the image, in pixels.
heightThe height of the image, in pixels.
formatThe format of the image.

◆ ImageView() [5/7]

nkImages::ImageView::ImageView ( const nkMemory::BufferView< unsigned char >  dataView,
unsigned int  width,
unsigned int  height,
unsigned int  depth,
PIXEL_FORMAT  format,
unsigned int  pixelByteSize,
unsigned int  rowByteSize 
)

Aligned 2D image constructor.

Parameters
dataViewThe view over the data which should be part of the image.
widthThe width of the image, in pixels.
heightThe height of the image, in pixels.
depthThe depth of the image, in number of slices of width * height images.
formatThe format of the image.
pixelByteSizeThe size of a pixel, in bytes.
rowByteSizeThe size of a row, in bytes.

◆ ImageView() [6/7]

nkImages::ImageView::ImageView ( const ImageView other)

Copy constructor. Note that no memory will be copied, only a new view over it will be created.

Parameters
otherThe view to copy over.

◆ ImageView() [7/7]

nkImages::ImageView::ImageView ( ImageView &&  other)

Move constructor.

Parameters
otherThe view to move.

◆ ~ImageView()

nkImages::ImageView::~ImageView ( )

Destructor.

Member Function Documentation

◆ getDataPtr()

virtual unsigned char* nkImages::ImageView::getDataPtr ( ) const
overridevirtual
Returns
A pointer over the image data.

Implements nkImages::ImageBase.

◆ operator=() [1/2]

ImageView& nkImages::ImageView::operator= ( const ImageView other)

Copy assignment operator.

Parameters
otherThe view to copy and assign.

◆ operator=() [2/2]

ImageView& nkImages::ImageView::operator= ( ImageView &&  other)

Move assignment operator.

Parameters
otherThe view to move and assign.

The documentation for this class was generated from the following file: